Skip to content

ISSUE #1060 - step 1 - change org.mongodb.morphia to#1122

Merged
velo merged 7 commits intoOpenFeign:masterfrom
kamilkrzywanski:issue_1060
May 6, 2025
Merged

ISSUE #1060 - step 1 - change org.mongodb.morphia to#1122
velo merged 7 commits intoOpenFeign:masterfrom
kamilkrzywanski:issue_1060

Conversation

@kamilkrzywanski
Copy link
Copy Markdown
Contributor

ISSUE #1060 - step 1 - change org.mongodb.morphia to dev.morphia.morphia - will be update to lastest version, now I only want to build it with CICD

@kamilkrzywanski
Copy link
Copy Markdown
Contributor Author

kamilkrzywanski commented May 5, 2025

Fails seems be related to #1091
@velo do you want to verify that?
CODECOV_TOKEN is empty

@velo
Copy link
Copy Markdown
Member

velo commented May 5, 2025

Circle CI doesn't inject env-vars for PRs initiated by 3rd parties

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2025

Codecov Report

Attention: Patch coverage is 81.08108% with 7 lines in your changes missing coverage. Please review.

Project coverage is 71.03%. Comparing base (fec2132) to head (b6fc05b).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ava/com/querydsl/mongodb/AbstractMongodbQuery.java 80.95% 3 Missing and 1 partial ⚠️
...om/querydsl/mongodb/morphia/MorphiaSerializer.java 77.77% 1 Missing and 1 partial ⚠️
...a/com/querydsl/mongodb/document/DocumentUtils.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1122      +/-   ##
============================================
+ Coverage     61.18%   71.03%   +9.85%     
  Complexity       84       84              
============================================
  Files           830      857      +27     
  Lines         32014    32348     +334     
  Branches       3591     3600       +9     
============================================
+ Hits          19588    22979    +3391     
+ Misses        11179     8144    -3035     
+ Partials       1247     1225      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@velo velo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, this change is long overdue.

I'm willing to break the API signature for next minor release, as this is a 3rd party change and I don't think this has been heavily used.

Just bring the plugin back.

Comment thread pom.xml Outdated
Comment thread querydsl-libraries/pom.xml Outdated
Comment thread querydsl-libraries/querydsl-mongodb/pom.xml
@velo velo requested a review from Copilot May 5, 2025 13:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the codebase to use the new dev.morphia library rather than the deprecated org.mongodb.morphia package. The key changes include replacing all Morphia-related import statements, adjusting test files to accommodate the new package, and updating the query API to use countDocuments in place of count.

Reviewed Changes

Copilot reviewed 28 out of 31 changed files in this pull request and generated no comments.

File Description
Food.java, Fish.java, DummyEntity.java, Dates.java, Country.java, Chips.java, Address.java, AbstractEntity.java Updated import statements from org.mongodb.morphia to dev.morphia
MongodbQueryTest.java, MongodbSerializerTest.java, MongodbPolymorphicCollectionTest.java, MongodbJoinTest.java, MongodbGeoSpatialQueryTest.java Updated import statements in test files to reference dev.morphia
MorphiaSerializer.java, MorphiaQuery.java Updated import statements to use dev.morphia API
AbstractFetchableMongodbQuery.java Changed query count from count() to countDocuments() to align with the new API
Files not reviewed (3)
  • pom.xml: Language not supported
  • querydsl-libraries/pom.xml: Language not supported
  • querydsl-libraries/querydsl-mongodb/pom.xml: Language not supported
Comments suppressed due to low confidence (1)

querydsl-libraries/querydsl-mongodb/src/test/java/com/querydsl/mongodb/document/AbstractFetchableMongodbQuery.java:230

  • Verify that the use of countDocuments() accurately replicates the behavior of count() and returns the expected data type, as the new API might have subtle differences.
return collection.countDocuments(createQuery(filter));

dev.morphia.morphia - skipping japicmp
@kamilkrzywanski
Copy link
Copy Markdown
Contributor Author

kamilkrzywanski commented May 5, 2025

<japicmp.skip>true</japicmp.skip> added to mongo module
It's first part of migration, now it's required to bump mongo stuff to lastest versions :)

@kamilkrzywanski
Copy link
Copy Markdown
Contributor Author

@velo seems to be done. There are a few things that could be updated (like removing deprecated code in the tests), but it's not necessary to address them right now. I’ll try to take care of it in the future when I find some free time.

@velo velo enabled auto-merge (squash) May 6, 2025 01:59
@velo velo merged commit 2615e10 into OpenFeign:master May 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants